#-*- coding: utf-8 -*-
from util.Metadata import Metadata

class Location:
    
    def __init__(self):
        self.id = u''
        self.address = u''
        self.category = u''
        self.subcategory = u''
        self.name = u''
        self.lat = 0.0
        self.long = 0.0
        self.opening = u''
        self.closing = u''
        self.tel = u''
        self.note = u''
        self.metadata = Metadata()
        
        #schifezza ad hoc per le farmacie mannaggia a me che non c'ero ll definizione del protocollo'
        self.opening_settimanale = u''

        
    def __str__(self):
        return 'id:"' + str(self.id) + '" addr:"' + str(self.address) + '" cat:"' + str(self.category) + '" name:"' + str(self.name) + '" lat:"' + str(self.lat) + '" lon:"' + str(self.long) + '" open:"' + str(self.opening) + '" close:"' + str(self.closing) + '" tel:"' + str(self.tel) + '" note:"' + str(self.note) + '" subcat:"' + str(self.subcategory) + '"'

    def __eq__(self, other): 
        return self.__dict__ == other.__dict__
    
    def dump (self):
        print self.id
        print self.address 
        print self.category
        print self.name
        print self.lat
        print self.long
        print self.opening
        print self.closing
        print self.tel
    
  
    
        
    
        

        